aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/payment/[id]/bump/+server.js
blob: 513198b0f297334c86eb3c219d2ea1a6b89eb0f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { auth, post } from "$lib/utils";
import { json, error } from "@sveltejs/kit";

export async function POST({ cookies, request }) {
  let body = await request.json();
  try {
    let res = await post("/replace", body, auth(cookies));
    return json(res);
  } catch (e) {
    error(400, e.message);
  }
}